/*
 * #%L
 * java model
 * %%
 * Copyright (C) 2009 - 2011 prefabware.com Stefan Isele
 * %%
 * All Rights Reserved.
 * This program is dual-licensed under the GNU General Public license
 * or a commercial license.
 * You may select to use one or the other of these licenses.
 * To obtain a commercial license please contact Stefan Isele at www.stefan-isele.de
 * Any modifications to this file must keep this entire header intact.
 * Redistribution, except as permitted by the selected license, is prohibited.
 * #L%
 */
package com.prefabware.jmodel.javadoc;

import java.util.ArrayList;
import java.util.List;

/**
 * the javadoc of a method
 * @author sisele_job
 * 
 */
public class JMethodJavadoc extends JJavadoc {
	private List<String> params;
	private String return_;
	private List<String> throws_;

	public JMethodJavadoc() {
		super();
		this.throws_=new ArrayList<String>();
		this.params=new ArrayList<String>();
	}

	public List<String> getThrows() {
		return throws_;
	}

	public void setThrows(List<String> throws_) {
		this.throws_ = throws_;
	}

	public List<String> getParams() {
		return params;
	}

	public void setParams(List<String> param) {
		this.params = param;
	}

	public String getReturn() {
		return return_;
	}

	/**
	 * @params return_
	 */
	public void setReturn(String return_) {
		this.return_ = return_;
	}

	@Override
	protected StringBuffer appendTags(StringBuffer document) {
		StringBuffer appended = appendTag("@params", this.getParams(), document);
		appended=appendTag("@return", this.getReturn(), appended);
		return appendTag("@throws", this.getThrows(), appended);
	}

	public boolean addParam(String param) {
		return params.add(param);
	}

	

}
